# Look at number of data points for each gear type
log_2021 %>% 
  group_by(grcde_sum) %>% 
  count()
## # A tibble: 3 × 2
## # Groups:   grcde_sum [3]
##   grcde_sum     n
##   <chr>     <int>
## 1 LL         3009
## 2 PT         3756
## 3 SP         2913
# also look at this from a region perspective
log_2021 %>% 
  group_by(grcde_sum, area) %>% 
  count()
## # A tibble: 18 × 3
## # Groups:   grcde_sum, area [18]
##    grcde_sum area                                n
##    <chr>     <chr>                           <int>
##  1 LL        Aleutian Islands                  334
##  2 LL        Bering Sea                         17
##  3 LL        Central Gulf of Alaska            634
##  4 LL        East Yakutat / Southeast Alaska  1276
##  5 LL        West Yakutat                      705
##  6 LL        Western Gulf of Alaska             43
##  7 PT        Aleutian Islands                   59
##  8 PT        Bering Sea                        138
##  9 PT        Central Gulf of Alaska           2334
## 10 PT        East Yakutat / Southeast Alaska   331
## 11 PT        West Yakutat                      605
## 12 PT        Western Gulf of Alaska            289
## 13 SP        Aleutian Islands                    5
## 14 SP        Bering Sea                        164
## 15 SP        Central Gulf of Alaska           1197
## 16 SP        East Yakutat / Southeast Alaska   542
## 17 SP        West Yakutat                      774
## 18 SP        Western Gulf of Alaska            231

Note that LL = Longline/HAL, Pot = Rigid, SP = Slinky

ggplot(ak) +
  geom_sf() +
  stat_density_2d(log_2021, mapping = aes(x = AdjLon, y = lat2,
                                          fill = log(..level..)),
                  geom = "polygon") + 
  facet_wrap(~grcde_sum, ncol = 1) +
  scale_fill_viridis_c() +
  labs(fill = "Kernel density of fishing") +
  theme_bw()

For some of these, I combined the rigid and slinky pots into one category

ggplot(log_2021, aes(x = bottom_depth, fill = grcde_sum)) +
  geom_density(alpha = 0.75) +
  scale_fill_colorblind() +
  theme_bw() 

# depth aggregated
ggplot(log_2021, aes(x = bottom_depth, fill = gr_pot_comb)) +
  geom_density(alpha = 0.75) +
  scale_fill_colorblind() +
  theme_bw() 

# depth by region
ggplot(log_2021, aes(x = bottom_depth, fill = grcde_sum)) +
  geom_density(alpha = 0.75) +
  scale_fill_colorblind() +
  facet_wrap(~area) +
  theme_bw() 

# combined gear
ggplot(log_2021, aes(x = bottom_depth, fill = gr_pot_comb)) +
  geom_density(alpha = 0.75) +
  scale_fill_colorblind() +
  facet_wrap(~area) +
  theme_bw() 

# catch retained weight
ggplot(log_2021, aes(x = retained_wgt, fill = grcde_sum)) +
  geom_density(alpha = 0.75) +
  scale_fill_colorblind() +
  theme_bw() 
## Warning: Removed 12 rows containing non-finite values (stat_density).

# catch retained numbers
ggplot(log_2021, aes(x = retained_fish, fill = grcde_sum)) +
  geom_density(alpha = 0.75) +
  scale_fill_colorblind() +
  theme_bw() 
## Warning: Removed 5644 rows containing non-finite values (stat_density).

# retained catch in numbers broken up by regions
ggplot(log_2021, aes(x = retained_fish, fill = grcde_sum)) +
  geom_density(alpha = 0.75) +
  scale_fill_colorblind() +
  facet_wrap(~area, scales = 'free') +
  theme_bw() 
## Warning: Removed 5644 rows containing non-finite values (stat_density).

# retained catch in numbers broken up by regions
ggplot(log_2021, aes(x = retained_fish, fill = gr_pot_comb)) +
  geom_density(alpha = 0.75) +
  scale_fill_colorblind() +
  facet_wrap(~area, scales = 'free') +
  theme_bw() 
## Warning: Removed 5644 rows containing non-finite values (stat_density).

# retained catch in weight broken up by regions
ggplot(log_2021, aes(x = retained_wgt, fill = grcde_sum)) +
  geom_density(alpha = 0.75) +
  scale_fill_colorblind() +
  facet_wrap(~area, scales = 'free') +
  theme_bw() 
## Warning: Removed 12 rows containing non-finite values (stat_density).

ggplot(log_2021, aes(x = retained_wgt, fill = gr_pot_comb)) +
  geom_density(alpha = 0.75) +
  scale_fill_colorblind() +
  facet_wrap(~area, scales = 'free') +
  theme_bw() 
## Warning: Removed 12 rows containing non-finite values (stat_density).

# look at retained weight/retained fish (weight per fish)
# this hopefully may hep us get into potential size differences
# in contact selectivity
ggplot(log_2021, aes(x = retained_wgt / retained_fish, fill = grcde_sum)) +
  geom_density(alpha = 0.75) +
  scale_fill_colorblind() +
  labs(y = "weight per fish (kg)") +
  theme_bw() 
## Warning: Removed 5661 rows containing non-finite values (stat_density).

# break this up by region
ggplot(log_2021, aes(x = retained_wgt / retained_fish, fill = grcde_sum)) +
  geom_density(alpha = 0.75) +
  facet_wrap(~area, scales = "free") +
  scale_fill_colorblind() +
  labs(y = "weight per fish") +
  theme_bw() 
## Warning: Removed 5661 rows containing non-finite values (stat_density).

# Regress retained weight/retained fish by bottom_depth
ggplot(log_2021, aes(x = bottom_depth, y =retained_wgt / retained_fish)) +
  geom_point() +
  geom_smooth() +
  labs(y = "weight per fish") +
  theme_bw() 
## `geom_smooth()` using method = 'gam' and formula 'y ~ s(x, bs = "cs")'
## Warning: Removed 5661 rows containing non-finite values (stat_smooth).
## Warning: Removed 5661 rows containing missing values (geom_point).

# break it up by region
ggplot(log_2021, aes(x = bottom_depth, y =retained_wgt / retained_fish,
                     color = area, fill = area)) +
  geom_point(color = "grey") +
  geom_smooth() +
  scale_fill_colorblind() +
  scale_color_colorblind() +
  facet_wrap(~area) +
  labs(y = "weight per fish") +
  theme_bw() 
## `geom_smooth()` using method = 'gam' and formula 'y ~ s(x, bs = "cs")'
## Warning: Removed 5661 rows containing non-finite values (stat_smooth).
## Removed 5661 rows containing missing values (geom_point).

# break it up by gear
ggplot(log_2021, aes(x = bottom_depth, y =retained_wgt / retained_fish,
                     color = grcde_sum, fill = grcde_sum)) +
  geom_point(color = "grey") +
  geom_smooth() +
  scale_fill_colorblind() +
  scale_color_colorblind() +
  facet_wrap(~grcde_sum) +
  labs(y = "weight per fish") +
  theme_bw() 
## `geom_smooth()` using method = 'gam' and formula 'y ~ s(x, bs = "cs")'
## Warning: Removed 5661 rows containing non-finite values (stat_smooth).
## Removed 5661 rows containing missing values (geom_point).

# break it up by gear and region
ggplot(log_2021, aes(x = bottom_depth, y =retained_wgt / retained_fish,
                     color = grcde_sum, fill = grcde_sum)) +
  geom_point(color = "grey") +
  geom_smooth() +
  scale_fill_colorblind() +
  scale_color_colorblind() +
  facet_grid(grcde_sum~area) +
  labs(y = "weight per fish") +
  theme_bw() 
## `geom_smooth()` using method = 'gam' and formula 'y ~ s(x, bs = "cs")'
## Warning: Removed 5661 rows containing non-finite values (stat_smooth).
## Warning: Computation failed in `stat_smooth()`:
## x has insufficient unique values to support 10 knots: reduce k.
## Computation failed in `stat_smooth()`:
## x has insufficient unique values to support 10 knots: reduce k.
## Warning: Removed 5661 rows containing missing values (geom_point).

# Repeat above, but combine slinky and rigid pots into one category
# break it up by gear
ggplot(log_2021, aes(x = bottom_depth, y =retained_wgt / retained_fish,
                     color = gr_pot_comb, fill = gr_pot_comb)) +
  geom_point(color = "grey") +
  scale_fill_colorblind() +
  scale_color_colorblind() +
  facet_wrap(~gr_pot_comb) +
  labs(y = "weight per fish") +
  theme_bw() 
## Warning: Removed 5661 rows containing missing values (geom_point).

# break it up by gear and region
ggplot(log_2021, aes(x = bottom_depth, y =retained_wgt / retained_fish,
                     color = gr_pot_comb, fill = gr_pot_comb)) +
  geom_point(color = "grey") +
  geom_smooth() +
  scale_fill_colorblind() +
  scale_color_colorblind() +
  facet_grid(gr_pot_comb~area) +
  labs(y = "weight per fish") +
  theme_bw()
## `geom_smooth()` using method = 'gam' and formula 'y ~ s(x, bs = "cs")'
## Warning: Removed 5661 rows containing non-finite values (stat_smooth).
## Warning: Computation failed in `stat_smooth()`:
## x has insufficient unique values to support 10 knots: reduce k.
## Computation failed in `stat_smooth()`:
## x has insufficient unique values to support 10 knots: reduce k.
## Warning: Removed 5661 rows containing missing values (geom_point).

# look at catch per skaate hauled
ggplot(log_2021, aes(x = retained_wgt / skates_hauled, fill = grcde_sum)) +
  geom_density(alpha = 0.75) +
  coord_cartesian(xlim = c(0, 3000)) +
  scale_fill_colorblind() +
  theme_bw() 
## Warning: Removed 12 rows containing non-finite values (stat_density).

# look at catch per skaate hauled combine pot
ggplot(log_2021, aes(x = retained_wgt / skates_hauled, fill = gr_pot_comb)) +
  geom_density(alpha = 0.75) +
  coord_cartesian(xlim = c(0, 3000)) +
  scale_fill_colorblind() +
  theme_bw() 
## Warning: Removed 12 rows containing non-finite values (stat_density).

# break this catch per skate hauled by region
ggplot(log_2021, aes(x = retained_wgt / skates_hauled, fill = grcde_sum)) +
  geom_density(alpha = 0.75) +
  coord_cartesian(xlim = c(0, 3000)) +
  facet_wrap(~area, scale = "free_y") +
  scale_fill_colorblind() +
  theme_bw() 
## Warning: Removed 12 rows containing non-finite values (stat_density).

# break this catch per skate hauled by region
ggplot(log_2021, aes(x = retained_wgt / skates_hauled, fill = gr_pot_comb)) +
  geom_density(alpha = 0.75) +
  coord_cartesian(xlim = c(0, 3000)) +
  facet_wrap(~area, scale = "free_y") +
  scale_fill_colorblind() +
  theme_bw() 
## Warning: Removed 12 rows containing non-finite values (stat_density).

# look at skate length aggregated
ggplot(log_2021, aes(x = skate_length, fill = grcde_sum)) +
  geom_density(alpha = 0.75) +
  scale_fill_colorblind() + 
  # facet_wrap(~vessel_length, ncol = 1) +
  theme_bw() 
## Warning: Removed 80 rows containing non-finite values (stat_density).

# skate length by vessel length
ggplot(log_2021, aes(x = skate_length, fill = grcde_sum)) +
  geom_density(alpha = 0.75) +
  scale_fill_colorblind() + 
  facet_wrap(~vessel_length, ncol = 1) +
  theme_bw() 
## Warning: Removed 80 rows containing non-finite values (stat_density).

# hook spacing / pot spacing
ggplot(log_2021, aes(x = hook_spacing, fill = grcde_sum)) +
  geom_density(alpha = 0.75) +
  coord_cartesian(xlim = c(0, 500)) +
  scale_fill_colorblind() + 
  labs(x = "hook spacing (m)") +
  theme_bw() 
## Warning: Removed 7 rows containing non-finite values (stat_density).

# total hooks / pots deployed
ggplot(log_2021, aes(x = total_hooks_pots, fill = grcde_sum)) +
  geom_density(alpha = 0.75) +
  facet_wrap(~grcde_sum, scales = "free") +
  scale_fill_colorblind() + 
  theme_bw() 

# skates hauled
ggplot(log_2021, aes(x = skates_hauled, fill = grcde_sum)) +
  geom_density(alpha = 0.75) +
  # facet_wrap(~grcde_sum, scales = "free") +
  scale_fill_colorblind() + 
  theme_bw()